<?php
defined( '_JEXEC' ) or die( 'Restricted access' );

jimport('joomla.application.component.model');

class pqcesModelCategorias extends JModel
{
	var $_data;
	function __construct()
	{
		parent::__construct();
		$this->_data	= null;
	}

	function &getData()
	{
		
		if (empty( $this->_data )) {
			$this->_db->setQuery( ' SELECT * FROM #__qcalendar_category ' );
			$this->_data = $this->_db->loadObjectList();
		}
		if (!$this->_data) {
			$tmpC = new stdClass();
			$tmpC->id = 0;
			$tmpC->short_desc = null;
			$tmpC->long_desc = null;
			$tmpC->short_desc_image = null;
			$tmpC->long_desc_image = null;
			$tmpC->active = null;
			$this->_data =array($tmpC);
		}
		return $this->_data;
	}
}
